<li class="page_level_<%= layoutpage.level %>" id="page_<%= layoutpage.id %>">
  <div class="sitemap_page<%= layoutpage.locked? ? ' locked' : '' %>">
    <div class="sitemap_left_images">
    <% if layoutpage.definition.blank? %>
      <span class="inline warning icon" title="<%= Alchemy.t(:page_definition_missing) %>"></span>
    <% else %>
      <%= render_icon(:page) %>
    <% end %>
    </div>
    <div class="sitemap_right_tools">
      <%- if can?(:configure, layoutpage) -%>
      <%= link_to_dialog(
        render_icon('configure_page'),
        alchemy.edit_admin_layoutpage_path(layoutpage),
        {
          title: Alchemy.t(:edit_page_properties),
          size: '410x170'
        },
        class: 'sitemap_tool',
        title: Alchemy.t(:edit_page_properties)
      ) -%>
      <%- end -%>
      <span class="sitemap_sitetools">
      <%- if can?(:copy, layoutpage) -%>
        <%= link_to(
          render_icon("copy_page"),
          alchemy.insert_admin_clipboard_path(
            remarkable_type: layoutpage.class.name.demodulize.underscore.pluralize,
            remarkable_id: layoutpage.id
          ),
          remote: true,
          method: 'post',
          class: "sitemap_tool",
          title: Alchemy.t(:copy_page)
        ) %>
      <%- end -%>
      <%- if can?(:destroy, layoutpage) -%>
        <%= link_to_confirm_dialog(
          render_icon('delete_page'),
          Alchemy.t(:confirm_to_delete_page),
          url_for(
            controller: 'pages',
            action: 'destroy',
            id: layoutpage.id
          ),
          {
            class: "sitemap_tool",
            title: Alchemy.t(:delete_page)
          }
        ) -%>
      <%- end -%>
      </span>
    </div>
    <div class="sitemap_sitename">
      <%= link_to(
        layoutpage.name,
        alchemy.edit_admin_page_path(layoutpage),
        title: Alchemy.t(:edit_page),
        class: "sitemap_pagename_link #{cycle('even', 'odd')}"
      ) -%>
    </div>
  </div>
</li>
